import { LAYOUT,newLAOUT,FIELD,newFIELD  } from '../attr-widget'

export interface IMAGE extends LAYOUT,FIELD {
  width: number
  height: number
}

export function newIMAGE(attr?:IMAGE):IMAGE{
  return Object.assign(
    newLAOUT(),
    newFIELD(),
    {
      field_default: '',
      width: 100,
      height: 100
    },
    attr
  ) as IMAGE
}

export const defaultFallback = ''

export const STATUS_OPTIONS = [
  {value:'0',label:'隐藏'},
  {value:'1',label:'占位'},
  {value:'2',label:'只读'},
  {value:'3',label:'编辑'},
  {value:'4',label:'必填'}
]